// 碰撞盒子

#ifndef ALICE_COLLISION_COLLISION_BOX_H_
#define  ALICE_COLLISION_COLLISION_BOX_H_

#include <SDL.h>

namespace alice {

class CollisionBox {
  public:
    SDL_Rect GetRect() { return rect_; }
    void SetBuffer(int x, int y, int w, int h) {
      buffer_ = {x, y, w, h};
    }

    void SetRect(int x, int y, int w, int h) {
      rect_ = {
        x - buffer_.x,
        y - buffer_.y,
        w - buffer_.w,
        h - buffer_.h
      };
    }

    void Show();

  private:
    SDL_Rect rect_;
    SDL_Rect buffer_;
};

}

#endif // ! ALICE_COLLISION_COLLISION_BOX_H_